import http from '@/Services/Request'

const base = '/api/ProductCategory'

export default {
    /** 获取所有分类 */
    GetAll() {
        return http.get(base)
    },

    /** 根据ID获取分类 */
    GetById(id) {
        return http.get(`${base}/${id}`)
    },

    /** 创建分类 */
    Create(model) {
        return http.post(base, model)
    },

    /** 更新分类 */
    Update(id, model) {
        return http.put(`${base}/${id}`, model)
    },

    /** 删除分类 */
    Delete(id) {
        return http.delete(`${base}/${id}`)
    },

    /** 获取所有启用的分类 */
    GetAllActive() {
        return http.get(`${base}GetAllActive`)
    }
} 